package common;

import java.io.Serializable;

public class RankingEntry implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String username;
	private String speciesName;
	int score;
	public enum State { PLAYING, NOT_PLAYING, EXTINCT };
	private State state;
	
	public RankingEntry(String username, String speciesName, int score){
		this.username = username;
		this.speciesName = speciesName;
		this.score = score;
		this.state = State.NOT_PLAYING;
	}

	public String getUsername() {
		return this.username;
	}

	public String getSpeciesName() {
		return this.speciesName;
	}
	
	public Integer getScore() {
		return this.score;
	}
	
	public State getState(){
		return this.state;
	}
	
	public void updateScore(int score){
		this.score = score;
	}


	public void setPlaying() {
		this.state = State.PLAYING;
		
	}
	
	public void setNotPlaying() {
		this.state = State.NOT_PLAYING;
		
	}
	
	public void setExtinct() {
		this.state = State.EXTINCT;
		
	}
}
